import {createRouter, createWebHistory} from 'vue-router'


const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path:"/",
            component:()=>import("@/views/login.vue")
        },
        {
            path: "/home",
            component: () => import("@/views/home.vue"),
            children:[
                {
                    path:"",
                    alias:"welcome",
                    component:()=>import("@/views/welcome.vue")
                },
                {
                    path:"project",
                    component:()=>import("@/views/project/project.vue")
                },{
                path:"projects",
                    component:()=>import("@/views/project/project-list.vue")
                },{
                path:"projects-my",
                    component:()=>import("@/views/project/project-my.vue")
                },{
                path:"projects-archive",
                    component:()=>import("@/views/project/project-archive.vue")
                },{
                path:"projects-delete",
                    component:()=>import("@/views/project/project-delete.vue")
                }, {
                    path:"tasks/:projectId",
                    component:()=>import("@/views/task/task.vue")
                }
            ]
        }

    ]
})

export default router
